﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
using System.Text;
using System.Collections;

namespace FluentTags
{
    /// <summary>
    /// A tag that is a child of another tag.  This includes almost all tags.
    /// </summary>
    public abstract class ChildTag<T, ParentType> : Tag<T>
        where T : Tag<T> 
        where ParentType : HtmlGenericControl
    {
        protected ParentType _parent = null;

        protected ChildTag(string tag, ParentType parent) : base(tag)
        {
            _parent = parent;
        }

        public new ParentType End()
        {
            return _parent;
        }

    }
}